<template>
	<view v-if="Object.keys(detailsData).length > 0">
		<view class="image">
			<image :src="'https://jsjhj.net'+detailsData.images" mode=""></image>
		</view>
		
		<view class="center">
			<!-- <view class="" v-html="message.navicontenttf">
			
			</view> -->
			<view class="complete_name">
				{{detailsData.complete_name}}
			</view>
			<view class="date">
				{{detailsData.create_date}}
			</view>
			<!-- <view style="padding: 0 20rpx;" v-html="detailsData.content">

			</view> -->
			<view style="padding: 0 20rpx;">
				<u-parse :html="detailsData.content"></u-parse>
			</view>
		</view>
	</view>
</template>

<script>
	import api from '@/static/js/api.js'

	import {
		writeVideoClick
	} from '@/static/js/api/home.js';

	import share from '@/mixins/src/sharepage.js'

	export default {
		onLoad(option) {
			uni.showLoading({
				title: '加载中'
			})
			this.id = option.id
			writeVideoClick(this.id).then(res => {
			})
			api.getIndustryData(this.id).then(res => {
				this.detailsData = res.data[0]
				this.share = {
					title: res.data[0].complete_name,
					path: `/pages/home/trade/components/treadetails?id=${this.id}`,
				}
				uni.hideLoading();
			})
		},
		data() {
			return {
				message: '',
				detailsData: {},
				id: 0,
				share: {}
			}
		},
		mixins: [share],
		methods: {}
	}
</script>

<style lang="less" scoped>
	.image {
		width: 100vw;
		height: 500rpx;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.center {
		margin-top: 20rpx;
		color: #808080;
		font-size: 28rpx;

		.date {
			text-align: center;
			font-size: 36rpx;
			color: #000;
		}
		.complete_name{
			text-align: center;
			font-size: 36rpx;
			color: #000;
			padding: 20rpx 20rpx;
			font-weight: bold;
		}
	}
</style>
